package com.ibm.risk.irmp.rule.vo;

import com.ibm.risk.irmp.common.audit.VersionAuditable;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import jakarta.persistence.Transient;
import lombok.Data;
import lombok.experimental.Accessors;


/**
 * Drools规则实体
 *
 * @author WeiYZZhou
 */
@Entity
@Data
@Accessors(chain = true)
@Table(name = "ri_rule_content")
public class RuleContent extends VersionAuditable {

    public static final String RULE_PACKAGE_PREFIX = "com.ibm.risk.irmp.rule.";

    @Id
    private String code;
    private String ruleContent;
    private String description;
    private Boolean isValid;
    private String domainCode;

    @Transient
    public String getRulePackage() {
        return RULE_PACKAGE_PREFIX + getDomainCode();
    }


}
